<template>
  <div id="home">
    <navbar class="home-nav"><div slot="center">购物车</div></navbar>
  <homeswiper></homeswiper>
  </div>
</template>

<script>
import navbar from '../../components/common/navbar/navbar.vue'
import  homeswiper from '../home/childComps/homeswiper.vue'
import {getHomeMultidata} from '../../network/home'

export default {
name: 'Home',

components: {
  navbar,
  homeswiper,

},

data(){
  return{
    banners:[],
    recommands:[]
  }
},

created(){
  getHomeMultidata().then(res=>{
    console.log(res);
    this.banners = res.data.banner.list;
    this.recommands = res.data.recommand/list
  })
}


}
</script>

<style scoped>
.home-nav {
  background-color: #ff8198;
  color: #fff;
}
</style>